//
//  ShuaiXuanTableViewCell.m
//  Car
//
//  Created by lanou on 15/9/23.
//  Copyright (c) 2015年 朱鸿儒. All rights reserved.
//

#import "ShuaiXuanTableViewCell.h"

@implementation ShuaiXuanTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self) {
        self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
        self.img = [[UIImageView alloc]initWithFrame:CGRectMake(5, 5, 88, 66)];
        self.img.backgroundColor = [UIColor lightGrayColor];
        [self addSubview:self.img];
        self.name = [[UILabel alloc]initWithFrame:CGRectMake(100, 10, kWidth - 100, 32)];
        [self addSubview:self.name];
        self.price = [[UILabel alloc]initWithFrame:CGRectMake(100, 50, kWidth - 100, 20)];
        [self addSubview:self.price];
    }
    return self;
}
- (void)setWithModel:(ShuaiXuanModel *)model{
    if ([Setting shareWithSetting].isOnPic == NO) {
    [self.img sd_setImageWithURL:[NSURL URLWithString:model.img]];
    }
    self.name.text = model.name;
    self.price.text = model.price;
    self.price.textColor = [UIColor redColor];
    self.price.font = [UIFont systemFontOfSize:12];
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
